#ifndef								APIAUDIO_H
#define								APIAUDIO_H

#include							<QObject>
#include							"packet.h"
#include							"encoder.h"

class								Audio;

class apiAudio : public QObject
{
	Q_OBJECT

public:
	apiAudio(Audio *audio, QObject *parent = 0);
	~apiAudio();

private:
	Audio							*_audio;
	
public:
	void							initConnect();
	void							startRecord();
	void							stopRecord();
	Encoder &						getEncoder() const;

public slots:
	void							handleNewPacket(Packet &);
	void							handleNewSound(SoundPacket*);

signals:
	void							newPacket(Packet &);
	void							newSound(SoundPacket*);
};

#endif // APINETWORK_H
